3.13 \(\int \frac{\csc ^4(x)}{a+b \cot (x)} \, dx\)

Optimal. Leaf size=38 \[ -\frac{\left (a^2+b^2\right ) \log (a+b \cot (x))}{b^3}+\frac{a \cot (x)}{b^2}-\frac{\cot ^2(x)}{2 b} \]

[Out]

(a*Cot[x])/b^2 - Cot[x]^2/(2*b) - ((a^2 + b^2)*Log[a + b*Cot[x]])/b^3

________________________________________________________________________________________

Rubi [A]  time = 0.0648538, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3506, 697} \[ -\frac{\left (a^2+b^2\right ) \log (a+b \cot (x))}{b^3}+\frac{a \cot (x)}{b^2}-\frac{\cot ^2(x)}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^4/(a + b*Cot[x]),x]

[Out]

(a*Cot[x])/b^2 - Cot[x]^2/(2*b) - ((a^2 + b^2)*Log[a + b*Cot[x]])/b^3

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{\csc ^4(x)}{a+b \cot (x)} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1+\frac{x^2}{b^2}}{a+x} \, dx,x,b \cot (x)\right )}{b}\\ &=-\frac{\operatorname{Subst}\left (\int \left (-\frac{a}{b^2}+\frac{x}{b^2}+\frac{a^2+b^2}{b^2 (a+x)}\right ) \, dx,x,b \cot (x)\right )}{b}\\ &=\frac{a \cot (x)}{b^2}-\frac{\cot ^2(x)}{2 b}-\frac{\left (a^2+b^2\right ) \log (a+b \cot (x))}{b^3}\\ \end{align*}

Mathematica [A]  time = 0.14594, size = 48, normalized size = 1.26 \[ \frac{2 \left (a^2+b^2\right ) (\log (\sin (x))-\log (a \sin (x)+b \cos (x)))+2 a b \cot (x)-b^2 \csc ^2(x)}{2 b^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^4/(a + b*Cot[x]),x]

[Out]

(2*a*b*Cot[x] - b^2*Csc[x]^2 + 2*(a^2 + b^2)*(Log[Sin[x]] - Log[b*Cos[x] + a*Sin[x]]))/(2*b^3)

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 64, normalized size = 1.7 \begin{align*} -{\frac{1}{2\,b \left ( \tan \left ( x \right ) \right ) ^{2}}}+{\frac{\ln \left ( \tan \left ( x \right ) \right ){a}^{2}}{{b}^{3}}}+{\frac{\ln \left ( \tan \left ( x \right ) \right ) }{b}}+{\frac{a}{{b}^{2}\tan \left ( x \right ) }}-{\frac{\ln \left ( a\tan \left ( x \right ) +b \right ){a}^{2}}{{b}^{3}}}-{\frac{\ln \left ( a\tan \left ( x \right ) +b \right ) }{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^4/(a+b*cot(x)),x)

[Out]

-1/2/b/tan(x)^2+1/b^3*ln(tan(x))*a^2+1/b*ln(tan(x))+1/b^2*a/tan(x)-1/b^3*ln(a*tan(x)+b)*a^2-1/b*ln(a*tan(x)+b)

________________________________________________________________________________________

Maxima [A]  time = 1.20574, size = 70, normalized size = 1.84 \begin{align*} -\frac{{\left (a^{2} + b^{2}\right )} \log \left (a \tan \left (x\right ) + b\right )}{b^{3}} + \frac{{\left (a^{2} + b^{2}\right )} \log \left (\tan \left (x\right )\right )}{b^{3}} + \frac{2 \, a \tan \left (x\right ) - b}{2 \, b^{2} \tan \left (x\right )^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^4/(a+b*cot(x)),x, algorithm="maxima")

[Out]

-(a^2 + b^2)*log(a*tan(x) + b)/b^3 + (a^2 + b^2)*log(tan(x))/b^3 + 1/2*(2*a*tan(x) - b)/(b^2*tan(x)^2)

________________________________________________________________________________________

Fricas [B]  time = 1.84446, size = 281, normalized size = 7.39 \begin{align*} -\frac{2 \, a b \cos \left (x\right ) \sin \left (x\right ) - b^{2} +{\left ({\left (a^{2} + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - b^{2}\right )} \log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}\right ) -{\left ({\left (a^{2} + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - b^{2}\right )} \log \left (-\frac{1}{4} \, \cos \left (x\right )^{2} + \frac{1}{4}\right )}{2 \,{\left (b^{3} \cos \left (x\right )^{2} - b^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^4/(a+b*cot(x)),x, algorithm="fricas")

[Out]

-1/2*(2*a*b*cos(x)*sin(x) - b^2 + ((a^2 + b^2)*cos(x)^2 - a^2 - b^2)*log(2*a*b*cos(x)*sin(x) - (a^2 - b^2)*cos
(x)^2 + a^2) - ((a^2 + b^2)*cos(x)^2 - a^2 - b^2)*log(-1/4*cos(x)^2 + 1/4))/(b^3*cos(x)^2 - b^3)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{4}{\left (x \right )}}{a + b \cot{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**4/(a+b*cot(x)),x)

[Out]

Integral(csc(x)**4/(a + b*cot(x)), x)

________________________________________________________________________________________

Giac [B]  time = 1.24584, size = 105, normalized size = 2.76 \begin{align*} \frac{{\left (a^{2} + b^{2}\right )} \log \left ({\left | \tan \left (x\right ) \right |}\right )}{b^{3}} - \frac{{\left (a^{3} + a b^{2}\right )} \log \left ({\left | a \tan \left (x\right ) + b \right |}\right )}{a b^{3}} - \frac{3 \, a^{2} \tan \left (x\right )^{2} + 3 \, b^{2} \tan \left (x\right )^{2} - 2 \, a b \tan \left (x\right ) + b^{2}}{2 \, b^{3} \tan \left (x\right )^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^4/(a+b*cot(x)),x, algorithm="giac")

[Out]

(a^2 + b^2)*log(abs(tan(x)))/b^3 - (a^3 + a*b^2)*log(abs(a*tan(x) + b))/(a*b^3) - 1/2*(3*a^2*tan(x)^2 + 3*b^2*
tan(x)^2 - 2*a*b*tan(x) + b^2)/(b^3*tan(x)^2)